package com.lh.api.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lh.api.form.OrderForm;
import com.lh.api.vo.*;
import com.lh.common.entity.admin.Order;
import com.lh.common.entity.api.RazorpayOrder;
import com.lh.common.utils.PageUtils;
import com.razorpay.RazorpayException;

import java.util.Map;

/**
 * @author gze
 * @ClassName:
 * @Description: (类作用)
 * @date: 2020-05-18 14:56
 */
public interface OrderService extends IService<Order> {

    CreateOrderVo createOrder(Long userId, OrderForm orderForm);

    RazorpayOrder payingOrder(String razorpayKeyId, String razorpayKeySecret, Long userId, String orderItem) throws RazorpayException;

    VerifyVo doOrderVerify(String razorpayPaymentId, boolean isTrue, String orderItem, Long userId);

    boolean orderPayCallback(String requestString);

    void cancelOrder(String orderItem, Long userId);

    void cancelPayment(String orderItem, Long userId);

    PageUtils<OneOrderListVo> getOneOrderList(Map<String, Object> params, Integer pageNum, Integer pageSize);

    OneOrderDetailVo getOneOrderDetail(Long userId, String orderItem);

    PageUtils<OrderListVo> getOrderList(Map<String, Object> params, Integer pageNum, Integer pageSize);

    OrderDetailVo getOrderDetail(Long userId, String orderItem);

    void confirmOrder(String orderItem, Long userId);

    void delOrder(String orderItem, Long userId);

    Order selectByItem(String orderItem);

    void updateBykey(Order updateOrder);
}
